home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mtgrap1c / demo2.cpp < prev    next >
C/C++ Source or Header  |  1994-07-13  |  2KB  |  63 lines

  1. /*                                                            
  2.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  3.   ▒                                                          ▒
  4.   ▒                                                          ▒
  5.   ▒             Neuromancer's Graphics Library               ▒
  6.   ▒                     Version 1.0c                         ▒
  7.   ▒                                                          ▒
  8.   ▒    Random lines will be displayed on the full screen     ▒
  9.   ▒    and then in a clipped region.                         ▒ 
  10.   ▒                                                          ▒ 
  11.   ▒                                                          ▒   
  12.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  13.   ▒                                                          ▒
  14.   ▒     Project:    MTLIB01.LIB                              ▒
  15.   ▒                 DEMO2.CPP                                ▒
  16.   ▒                                                          ▒ 
  17.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  18. */
  19.  
  20. #include <iostream.h>
  21. #include <stdlib.h>
  22. #include <conio.h>
  23. #include "video.h"
  24. #include "line.h"
  25.  
  26. void main(void)
  27. {
  28.  
  29.     mtSetVGAMode();            //Set up VGA Mode
  30.  
  31.     while(!kbhit())
  32.     {
  33.        mtLine( rand() % 320,rand()%200,rand() %320, rand() %200, rand()%255+1 ) ;
  34.     }
  35.  
  36.     getch();
  37.  
  38.     mtClrScr(0);
  39.         
  40.     mtSetWindow(15,15,304,184);    //set up clip region
  41.     mtClrScr(15);            //clear region to color 15
  42.  
  43.     while(!kbhit())
  44.     {
  45.        mtCLine( random(320),random(200),random(320), random(200), random(256));
  46.     }
  47.  
  48.     getch();
  49.     mtSetTextMode();
  50.  
  51.     cout << "Thank you for using the library!" << endl;
  52.  
  53.     exit(0);
  54.     
  55. }
  56.  
  57.            
  58.             
  59.  
  60.            
  61.  
  62.            
  63.